<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>


            <c:forEach items="${pageModelProduct.list}" var="product" varStatus="status">
            	<c:choose>
            	<c:when test="${status.index%2==0}">
            				<div class="secCon">
			   	                  <div class="secHeader"></div>
			                     <div class="secDet">
			                     	<h3 class="font14px fontWeight"><a href="#">${product.title}</a></h3>
			                        <a href="#" class="secPic"><img src="${product.imageServer}${product.cover}" class="r5" /></a>
			                        <div class="secPrice">
			                        	<div class="cpPrice">
			                            	<span><i>￥</i>${product.price}</span>
			                     <c:choose>
									 <c:when test="${member!=null }">
	                                     <a href="javascript:void(0);" onclick="GUOGUO.showPayPage('${product.identifier}');" class="thBigBtn"></a>                            
	                            	</c:when>
	                            	 <c:otherwise>
	                 					<a  href="javascript:void(0);" onclick="GUOGUO.memberLogin();" class="thBigBtn"></a>
	               					  </c:otherwise>
                				 </c:choose>
			                            </div>
			                       </div>	
			                       	<span class="djJoinNum">剩余个数：<i class="colorRed font18px fontWeight">${product.amount}</i></span>	
			                        <span class="djJoinNum"><i class="colorRed font18px fontWeight">${product.personNum}</i>人已参加：</span>		
			                        <ul class="djUser">
			                        	<c:forEach items="${product.memberList}" var="member">
										<li>
			                            		<a href="#" class="name" onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${member.nickname}',this)"><img src="${member.imageServer}${member.avatar}" class="r3" /></a>
			                            </li> 
			                            </c:forEach>
			                        </ul>	
			                     </div>
			                     <div class="secFooter"></div>
			                </div>
            	 </c:when>
               	 <c:otherwise>
			                <div class="secCon noMarginR">
			                     <div class="secHeader"></div>
			                     <div class="secDet">
			                     	<h3 class="font14px fontWeight"><a href="#">${product.title}</a></h3>
			                        <a href="#" class="secPic"><img src="${product.imageServer}${product.cover}" class="r5" /></a>
			                        <div class="secPrice">
			                        	<div class="cpPrice">
			                            	<span><i>￥</i>${product.price}</span>
			                                  <c:choose>
													 <c:when test="${member!=null }">
					                                     <a href="javascript:void(0);" onclick="GUOGUO.showPayPage('${product.identifier}');" class="thBigBtn"></a>                            
					                            	</c:when>
					                            	 <c:otherwise>
					                 					<a  href="javascript:void(0);" onclick="GUOGUO.memberLogin();" class="thBigBtn"></a>
					               					  </c:otherwise>
                							 </c:choose>
			                            </div>
			                      	
			                      	
			                       </div>	
			                       	<span class="djJoinNum">剩余个数：<i class="colorRed font18px fontWeight">${product.amount}</i></span>
			                        <span class="djJoinNum"><i class="colorRed font18px fontWeight">${product.personNum}</i>人已参加：</span>		
			                       
			                        <ul class="djUser">
			                        	 <c:forEach items="${product.memberList}" var="member">
											<li>
				                            	<a href="#" class="name" onmouseout="GUOGUO.hideFamilyTip()" onmousemove="GUOGUO.familyTip('${member.nickname}',this)"><img src="${member.imageServer}${member.avatar}" class="r3" /></a>
				                            </li> 
			                             </c:forEach>
			                        </ul>	
			                     </div>
			                     <div class="secFooter"></div>
			                </div>
			       </c:otherwise>
                </c:choose>
              </c:forEach>
              <c:if test="${pageModelProduct.totalPage > 1}">
				<div id="pager" class="h_page" style="margin-top: 20px"></div>
		      </c:if>
<script type="text/javascript">
$(function(){
	$("#pager").pager({ pagenumber: ${pageModelProduct.currentPage}, 
		pagecount: ${pageModelProduct.totalPage},
		buttonClickCallback: function(page){
			$('#productList').load("productList.htm?page="+page);
			
		}
});
});
	

</script>